package com.stone.persistent.recyclerview.adapter;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.viewpager2.adapter.FragmentStateAdapter;

import com.stone.persistent.recyclerview.fragment.MenuGridFragment;

import org.jetbrains.annotations.NotNull;


public class MenuPagerAdapter extends FragmentStateAdapter {
    @NotNull
    public Fragment createFragment(int position) {
        MenuGridFragment menuGridFragment = new MenuGridFragment();
        menuGridFragment.setPage(position);
        return (Fragment)menuGridFragment;
    }

    public int getItemCount() {
        return 2;
    }

    public MenuPagerAdapter(@NotNull FragmentActivity fragmentActivity) {
        super(fragmentActivity);
    }
}

